//
//  ViewController1.m
//  练习2
//
//  Created by qianfeng0 on 16/4/15.
//  Copyright © 2016年 heziheng. All rights reserved.
//

#import "ViewController1.h"

@interface ViewController1 ()

@end

@implementation ViewController1

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(void)createScrollView{
    CGSize size=self.view.bounds.size;
    self.scrollView=[[UIScrollView alloc]initWithFrame:self.view.bounds];
    for (NSInteger i=0; i<self.images.count; i++) {
        UIImage *image=[UIImage imageWithContentsOfFile:self.images[i]];
        UIImageView *imageView =[[UIImageView alloc]initWithFrame:CGRectMake(i%3*(size.width/3), i/3*(size.height/3), size.width/3, size.height/3)];
        imageView.image=image;
        [self.scrollView addSubview:imageView];
    }
    [self.view addSubview:self.scrollView];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
